package com.elb.sell.service.impl;

import com.elb.sell.dao.ProductInfoDao;
import com.elb.sell.pojo.ProductInfo;
import com.elb.sell.service.ProductInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Service;

import java.awt.print.Pageable;
import java.util.List;

/**
 * @author HanLiBin
 * @version V1.0
 */
@Service
public class ProductInfoServiceImpl implements ProductInfoService {
    @Autowired
    private ProductInfoDao productInfoDao;
    @Override
    public List<ProductInfo> findByProductStatus(Integer productStatus) {
        return productInfoDao.findByProductStatus(productStatus);
    }

    @Override
    public Page<ProductInfo> findAll(org.springframework.data.domain.Pageable pageable) {
        return productInfoDao.findAll(pageable);
    }

    @Override
    public List<ProductInfo> findAll() {
        return productInfoDao.findAll();
    }

    @Override
    public ProductInfo findOne(String id) {
        return productInfoDao.findOne(id);
    }

    @Override
    public ProductInfo save(ProductInfo productInfo) {
        return productInfoDao.save(productInfo);
    }


}
